package wqh.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import wqh.dao.AlarmConfirmDao;
import wqh.domain.AlarmConfirm;
import wqh.service.AlarmConfirmService;


import java.util.List;

/**
 * Created by devts on 2016/9/28.
 */
@Service("alarmConfirmService")
public class AlarmConfirmServiceImpl implements AlarmConfirmService {

    @Autowired
    private AlarmConfirmDao alarmConfirmDao;

    public int insertRecord(AlarmConfirm alarmConfirm) {
        return this.alarmConfirmDao.insertRecord(alarmConfirm);
    }

    public int updateConfirmStatus(Integer confirm_status,Integer confirm_time, Integer id) {
        return this.alarmConfirmDao.updateConfirmStatus(confirm_status,confirm_time,id);
    }

    public List<AlarmConfirm> findAllRecord() {
        return this.alarmConfirmDao.findAllRecord();
    }

    public List<AlarmConfirm> findAllByConfirmStatus(Integer id) {
        return this.alarmConfirmDao.findAllByConfirmStatus(id);
    }

    public List<AlarmConfirm> findAllByTimeTo(Integer unix_time) {
        return this.alarmConfirmDao.findAllByTimeTo(unix_time);
    }

    public AlarmConfirm findAllById(Integer id) {
        return this.alarmConfirmDao.findAllById(id);
    }

    public List<AlarmConfirm> findAllByTimeToAndConfirmStatus(Integer unix_time, Integer confirm_status) {
        return this.alarmConfirmDao.findAllByTimeToAndConfirmStatus(unix_time, confirm_status);
    }

    public List<AlarmConfirm> findExportLog(Integer unix_time_start, Integer unix_time_end) {
        return this.alarmConfirmDao.findExportLog(unix_time_start, unix_time_end);
    }

    public List<AlarmConfirm> findByTimeRange(Integer start, Integer end) {
        return this.alarmConfirmDao.findByTimeRange(start, end);
    }

    public List<AlarmConfirm> findByTimeRangeAndType(String type, Integer start, Integer end) {
        return this.alarmConfirmDao.findByTimeRangeAndType(type, start, end);
    }

    public List<AlarmConfirm> findByStatus(String dev_status) {
        return this.alarmConfirmDao.findByStatus(dev_status);
    }

    public int findAllCount(String dev_status) {
        return this.alarmConfirmDao.findAllCount(dev_status);
    }

    public int deleteById(Integer id) {
        return this.alarmConfirmDao.deleteById(id);
    }
}
